Microsoft Office 365 Remote Library Object

From APA 7.3, the Real-Time Designer provides functionality for connecting directly to a Microsoft Office 365 server and handling Microsoft Outlook 365 email resources. By connecting directly to the server, your solution can work with Outlook 365 email resources without Outlook installed on the Real-Time Client machine.

The Mark Email As Unread function was added in APA 7.4, together with support for additional parameters in existing functions.

In APA 7.7, the Add Recipient(s) to Outlook Email and Move Email to Folder functions were added.

For details on incorporating this functionality into your solutions, see Using Microsoft Outlook 365.

This library includes the following business entities:

  • Exchange 365 Connection, found in Business Entities > Library Types > Microsoft Outlook, which contains the properties and functions you need to establish an authenticated connection with an Office 365 server. For details, see Exchange 365 Connection Business Entity.

  • Outlook Email, found in Business Entities > Library Types > Microsoft Outlook, which contains the properties you need to work with Outlook 365 email messages. For details, see Outlook Email Business Entity.

  • Outlook Attachment Info, found in Business Entities > Library Types > Microsoft Outlook, which contains the properties you need to work with Outlook 365 email message attachments. For details, see Outlook Attachment Info Business Entity.

The library functions are exposed under Project > References > Library References > Direct.MsOffice.Remote.Library. For details, see Microsoft Office 365 Library Functions.

Authentication

The following authentication methods are supported:

  • Implicit (Windows Integrated)

  • Client Credentials

  • Interactive (pop-up window)

Permissions

The following permissions need to be granted on the Microsoft identity platform:

API/Permissions name Description

Mail.ReadWrite

Read and write access to user mail

Mail.Send

Send mail as a user

User.Read

Sign in and read user profile

Exchange 365 Connection Business Entity

The Exchange 365 Connection business entity contains the properties and functions for establishing an authenticated connection with an Office 365 server. This business entity is found in Business Entities > Library Types > Microsoft Outlook.

A successful connection to the Office 365 server is a precondition for using the functions that access Outlook 365 email resources, described in Microsoft Office 365 Library Functions. If the connection gets disconnected, you will have to connect again for your solution to continue working.

The Exchange 365 Connection business entity includes the following properties:

Property

Input Type

Description

Application Id Text

The ID of the application requesting permissions on behalf of a user to access Office 365 resources. This ID is only meaningful in the context of the hosting tenant.

Your network administrator will need to configure the application ID and provide it to you.

Tenant Id Text

The ID of the tenant of the Microsoft Identity Platform, through which Office 365 applications access Office 365 resources. The tenant is usually an organization.

Your network administrator will need to provide you with this value.

Is Connected Boolean A read-only Boolean property that indicates if a connection has been established with the Office 365 server. The value of this property is updated to True when the connection succeeds, and to False when the connection is disconnected. while the value of this property is False, all the functions that require access to Outlook 365 email resources will fail.

Once you have defined an instance of the Exchange 365 Connection business entity, use one of the following functions to connect to the Office 365 server.

Outlook Attachment Info Business Entity

The Outlook Attachment Info business entity found in Business Entities > Library Types > Microsoft Outlook holds email message attachment details.

The Outlook Attachment Info business entity includes the following properties:

Property

Input Type

Description

ContentType Text The MIME type of the attachment content.
Id Text A unique identifier of the attachment, assigned by the server. This is used in the function Download Attachment to identify the attachment to be downloaded.
Is Inline Boolean

Indicates if the attachment is an inline attachment or a non-inline attachment. Currently only non-inline attachments are supported, so the value of this property is always False.

Name Text

A friendly string identifier of the attachment.

Size Number The size of the attachment, in bytes.

Outlook Email Business Entity

The Outlook Email business entity found in Business Entities > Library Types > Microsoft Outlook holds email message details.

Typically, Outlook Email objects are returned by the functions Get Emails or Get Matching Emails, and can then be manipulated, for example by forwarding or deleting them. The exception is Send Email, for which you need to build an Outlook Email object before you can send it.

The Outlook Email business entity includes the following properties:

Property

Input Type

Description

Attachments Info List of Outlook Attachment Info

A list of the Outlook Attachment Info business entities that hold the details of the attachments of this email message.

Body Text

The content of the email message.

Cc List of Text A list of valid email addresses of the CC recipients of the email message.
Has Attachments Boolean Indicates if the email message has at least one attachment (True), or no attachments (False) (read-only).
Id Text The ID of the email message, assigned by the Office 365 server (read-only).
Is HTML Boolean Indicates if the email message content is HTML formatted (True), or not HTML formatted (False) (read-only).
Is Read Boolean Indicates if the email message has been read (True) or not (False) (read-only).
Preview Text A text preview of the email message content (read-only).
Received DateTime DateTime The date and time the email message was received (read-only).
Sender Text A valid email address of the email message sender (read-only).
Sent DateTime DateTime The date and time the email message was sent (read-only).
Subject Text The email message subject.
To List of Text A list of valid email addresses of the direct recipients of the email message.

The Outlook Email business entity includes the following function:

Microsoft Office 365 Library Functions

The library functions for accessing and manipulating Outlook 365 email resources are exposed under Library Objects > Direct.MsOffice.Remote.Library > Microsoft Exchange 365.

Successful authentication by the Office 365 server is a precondition for using these functions. They all accept an Exchange 365 Connection business entity as their first parameter, and this connection must already be established in order for the functions to succeed. For details, see Exchange 365 Connection Business Entity.